package top.sjydzq.one.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import top.sjydzq.one.Entity.Category;

import java.util.List;

@Mapper
@Repository
public interface CategoryMapper {

    @Select("SELECT * FROM category ORDER BY id DESC")
    List<Category> selectAll();

    @Select("SELECT * FROM category WHERE id=#{id}")
    Category selectById(int id);
}
